﻿using MapleLeaf.Pay;
using System;
using System.Text;
using System.Xml.Linq;

namespace Hongsh.Pay.Client.Proxy.Http {
    // Token: 0x02000033 RID: 51
    public class HttpXmlResult : HttpTextResult {
        // Token: 0x17000099 RID: 153
        // (get) Token: 0x06000171 RID: 369 RVA: 0x0000304A File Offset: 0x0000124A
        public string Root { get; }

        // Token: 0x1700009A RID: 154
        // (get) Token: 0x06000172 RID: 370 RVA: 0x00003052 File Offset: 0x00001252
        public object Content { get; }

        // Token: 0x1700009B RID: 155
        // (get) Token: 0x06000173 RID: 371 RVA: 0x0000305A File Offset: 0x0000125A
        public override string Text => HongshExtends.ToXElement(Content, Root).ToString(SaveOptions.DisableFormatting);

        // Token: 0x06000174 RID: 372 RVA: 0x00003073 File Offset: 0x00001273
        public HttpXmlResult(object content, string root) : this(Encoding.UTF8, content, root) {
            //Class15.cwcZ3SWztHroi();
            //this..ctor(Encoding.UTF8, content, root);
        }

        // Token: 0x06000175 RID: 373 RVA: 0x00003087 File Offset: 0x00001287
        public HttpXmlResult(Encoding encoding, object content, string root) : base(encoding, null, "text/xml") {
            //Class15.cwcZ3SWztHroi();
            //base..ctor(encoding, null, "text/xml");
            Root = root;
            Content = content;
        }
    }
}
